<template>
  <div class="roadhome">
    <div class="roadhomemain">
      <!-- cesium底图 -->
      <div class="cesiumdiv">
        <cesium />
      </div>
      <!-- content 阴影 -->
      <div class="mapshadow">
      </div>

      <!-- header 内容 -->
      <div class="roadhomeheader">
        <roadheader />
      </div>

      <!-- content 边框 -->
      <div class="roadhomecontentborder">
      </div>

      <!-- content 路由内容 -->
      <div class="roadhomerv">
        <router-view />
      </div>

      <!-- 底部按钮 -->
      <div class="routerbtn">
        <div
          v-for="item in btnlist"
          :class=" item.name == activename ? 'eachbtna' : 'eachbtn'"
          @click="btnclick(item)"
        >
          <icon-svg
            :icon-class="item.icon"
            :color="item.name == activename ? '#F0971F' : '#09B1E6'"
            width="30px"
            height="30px"
          ></icon-svg>
        </div>
      </div>


      <!-- <div class="backmap">
        <backmap/>
      </div>-->
    </div>
  </div>
</template>
<script>
import roadheader from "./roadhomeheader";
import backmap from "./backmap";
import cesium from "./mainpage/cesium";

export default {
  components: { roadheader, backmap, cesium },
  data() {
    return {
      activename: "",
      btnlist: [
        { name: "aaa1", icon: "qiche" },
        { name: "aaa2", icon: "jinggai" },
        { name: "aaa3", icon: "jietouzuoyi" },
        { name: "aaa4", icon: "shebeizhuangtai" }
      ]
    };
  },
  computed: {},
  watch: {},
  mounted() {},
  methods: {
    btnclick(item) {
      this.activename = item.name;
      switch (item.name) {
        case "aaa4":
          this.$router.push("/");
          break;

        default:
          break;
      }
      console.log("sdfsdfsdf");
    }
  }
};
</script>
<style lang='scss' scoped>
.roadhome {
  background-image: url("/roadhome/road-main.png");
  background-size: 100% 100%;
  // box-shadow: 0 0 3px blue;
  background-repeat: no-repeat;
  background-color: #00082f;
  background-position: center;
  position: relative;
  width: 100%;
  height: 100%;


  .roadhomemain {
  }
  .cesiumdiv {
    z-index: 1;
    height: 100vh;
  }
  .mapshadow {
    pointer-events: none;
    position: absolute;
    background-image: url("/roadhome/road-main.png");
    background-size: 100% 100%;
    z-index: 3;
    background-repeat: no-repeat;
    // background-color: #00082f;
    background-position: center;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
  }
  .roadhomeheader {
    position: absolute;
    width: 100%;
    z-index: 5;
    height: 84px;
    top: 10px;
    background-image: url("/roadhome/road-head.png");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
  }
  .roadhomecontentborder {
    // height: calc(100vh - 84px);
    position: absolute;
    pointer-events: none;
    top: 94px;
    width: 100%;
    z-index: 5;
    height: calc(100vh - 94px);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    background-image: url("/roadhome/road-container.png");
  }
  .roadhomerv {
    // height: calc(100vh - 84px);
    position: absolute;
    // pointer-events: none;
    top: 94px;
    // width: 100%;
    z-index: 10;
    // height: calc(100vh - 94px);
    // background-repeat: no-repeat;
    // background-position: center;
    // background-size: 100% 100%;
    // background-image: url("/roadhome/road-container.png");
  }
  .routerbtn {
    position: absolute;
    margin: 0 auto;
    width: 400px;
    height: 50px;
    color: aqua;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    z-index: 9;
    justify-content: space-between;
    .eachbtna {
      width: 41px;
      height: 41px;
      background: url();
      background-repeat: no-repeat;
      // text-align: center;
      display: flex;
      flex: row;
      justify-content: center;
      align-items: center;
      cursor: pointer;
    }
    .eachbtn {
      width: 41px;
      height: 41px;
      background: url();
      background-repeat: no-repeat;
      // text-align: center;
      display: flex;
      flex: row;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      &:hover {
        width: 41px;
        height: 41px;
        background: url();
        background-repeat: no-repeat;
      }
    }
  }
}
</style>